<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @keyframes swiper {
            from {
                transform: translate(0);
            }
            15%,
            25% {
                transform: translate(-200px);
            }
            40%,
            55% {
                transform: translate(-400px);
            }
            70%,
            85% {
                transform: translate(-200px);
            }
            100% {
                transform: translate(0);
            }
        }
        
        * {
            margin: 0;
            padding: 0;
        }
        
        .father {
            margin: 20px;
            width: 200px;
            height: 100px;
            border: #000 solid;
            overflow: hidden;
        }
        
        .box {
            width: 600px;
            display: flex;
            height: 100px;
            animation: swiper 6s infinite;
        }
        
        .son {
            font-size: 20px;
            text-align: center;
            line-height: 100px;
            color: #fff;
            font-weight: bold;
            width: 200px;
            height: 100px;
        }
        
        .son:nth-child(1) {
            background-color: red;
        }
        
        .son:nth-child(2) {
            background-color: green;
        }
        
        .son:nth-child(3) {
            background-color: blue;
        }
    </style>

</head>

<body>
    <div class="father">
        <div class="box">
            <div class="son">red</div>
            <div class="son">green</div>
            <div class="son">blue</div>
        </div>
    </div>
</body>

</html>